using System;

namespace NEnsure
{
	public interface IRuleContainer
	{
		string PropertyName { get; }

		BrokenRule[] BrokenRules { get; }

		IBusinessRule[] Rules { get; }

		event ValidationHandler<EventArgs> RanRule;

		event ValidationHandler<EventArgs> RunningRule;

		bool AreAllRulesSatisfied();
	}

	public interface IRuleContainer<T> : IRuleContainer
	{
		T PropertyValue { get; }

		IRuleContainer<T> Satisfies(params IBusinessRule[] rules);
	}
}
